function simpleStatOfGM(inDir,outDir,bandName)

filter=strcat('*',bandName);
filter=strcat(filter,'*');
files=dir(fullfile(inDir,filter));


nConditions=length(files);

stat.C=cell(1,nConditions);
stat.Lambda=cell(1,nConditions);
stat.Efficiency=cell(1,nConditions);
stat.Csurr=cell(1,nConditions);
stat.Lambdasurr=cell(1,nConditions);
stat.Efficiencysurr=cell(1,nConditions);

stat.Q=cell(1,nConditions);
stat.Ci=cell(1,nConditions);
stat.PC=cell(1,nConditions);
stat.Z=cell(1,nConditions);
stat.Qsurr=cell(1,nConditions);
stat.PCsurr=cell(1,nConditions);
stat.Zsurr=cell(1,nConditions);
stat.Conditions=cell(1,nConditions);

for i=1:nConditions
    load(fullfile(inDir,files(i).name));
    
    stat.C{i}=smallworld.C;
    stat.Lambda{i}=smallworld.lambda;
    stat.Efficiency{i}=smallworld.efficiency;
    stat.Csurr{i}=smallworld.Csurr;
    stat.Lambdasurr{i}=smallworld.lambdasurr;
    stat.Efficiencysurr{i}=smallworld.efficiencysurr;

    stat.Q{i}=modularity.Q;
   
    
    stat.Ci{i}=modularity.Ci;
    stat.PC{i}=modularity.PC;
    stat.Z{i}=modularity.Z;
    stat.Qsurr{i}=modularity.Qsurr;
    stat.PCsurr{i}=modularity.PCsurr;
    stat.Zsurr{i}=modularity.Zsurr;
   
    
    stat.Conditions{i}=files(i).name;

end

outfile=strcat(bandName,'_statGMwithrest');
save(fullfile(outDir,outfile),'stat');
